<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Upload using iframe</title>
<script language="JavaScript" src="./js/jquery-1.5.1.min.js"></script>
<script language="JavaScript">

function uploaded() {
	var result = {
		code: $("#code", fraUpload.document).val(),
		fileName: $("#fileName", fraUpload.document).val(),
		fileId: $("#fileId", fraUpload.document).val(),
		metadataId: $("#metadataId", fraUpload.document).val(),
		mimeType: $("#mimeType", fraUpload.document).val(),
		length: $("#length", fraUpload.document).val(),
		fileUrl: $("#fileUrl", fraUpload.document).val(),
		imageUrl: $("#imageUrl", fraUpload.document).val()
	}
	if (result.code == 'SUCCESS') {
		$("#uploadResultDiv").append("<p>파일명: "+result.fileName+":"+result.fileUrl+"</p>");
		fraUpload.location = "/s4s/upload/svc000?p=t";
	} else {
		alert("업로드에 실패했습니다:" + result.code);
	}
}
</script>
</head>
<body>
<div>파일을 선택해주세요.</div>

<iframe name="fraUpload" id="fraUpload" 
		width="250" height="40" frameborder="0" marginheight="0" marginwidth="0" scrolling="no"
		src="/s4s/upload/svc000?p=t"></iframe>

<div id="uploadResultDiv"></div>

</body>
</html>